<template>
	<view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		methods: {

		},
		onShow() {
			this.$store.commit("init", this.$socket)
			console.log("launch init")
			if (this.$store.state.isLogin === true) {
				// console.log(this.$store.state.isLogin)
				setTimeout(function() {
					console.log("redirect home")
					uni.reLaunch({
						url: '../home/home'
					})
				}, 300)
			} else {
				setTimeout(function() {
					console.log("redirect login")
					uni.reLaunch({
						url: "../login/login"
					})
				}, 300)
			}
		}
	}
</script>

<style>

</style>
